﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
    <script type="text/javascript" src="../../js/commonCss.js"></script>
    <script type="text/javascript" src="../../js/commonJs.js"></script>
<link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css" />
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>历史流程</title>
</head>
<body>
<div class="page-container">
	<table class="table table-border table-bordered table-hover table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="6">历史流程信息</th>
			</tr>
			<tr class="text-c">
				<th width="120">活动ID</th>
				<th width="120">流程实例ID</th>
				<th width="120">活动名称</th>
				<th width="120">办理人</th>
				<th width="120">开始时间</th>
				<th width="120">结束时间</th>
			</tr>
		</thead>
		<tbody id="top_1">

		</tbody>
	</table>

</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript">

	(function($){
		$.getUrlParam = function(name)
		{
			var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
			var r = window.location.search.substr(1).match(reg);
			if (r!=null) return unescape(r[2]); return null;
		}
	})(jQuery);


	$(function(){
		var processInstanceId = $.getUrlParam('processInstanceId');

		var str = "";
		$.ajax({
			type: 'POST',
			contentType: "application/json;charset=UTF-8",
			url: '/history/historyTaskList',
			//url: '/history/historyActInstanceList',
			dataType: 'json',
			data:'{"processInstanceId":"'+processInstanceId+'"}',
			success: function(data){
				var obj = eval(data);
				for(var i=0;i<obj.length;i++){
					//alert(obj[i].id);
					if (str == "") {
						str = '<tr class="text-c">' +
								'<td>'+obj[i].id+'</td>' +
								'<td>'+obj[i].processInstanceId+'</td>' +
								'<td>'+obj[i].name+'</td>' +
								'<td>'+obj[i].assignee+'</td>' +
								'<td>'+obj[i].createTime+'</td>' +
								'<td>'+obj[i].endTime+'</td>';

					}else {
						str = str + '<tr class="text-c">' +
								'<td>'+obj[i].id+'</td>' +
								'<td>'+obj[i].processInstanceId+'</td>' +
								'<td>'+obj[i].name+'</td>' +
								'<td>'+obj[i].assignee+'</td>' +
								'<td>'+obj[i].createTime+'</td>' +
								'<td>'+obj[i].endTime+'</td>';
					}
				}
				$("#top_1").html(str);
			},
			error:function(data) {
				console.log(data.msg);
			}
		});




	})




</script>
</body>
</html>